package com.zdp.applet.rest;

import com.zdp.applet.service.OrderService;
import com.zdp.common.domain.bo.SubmitOrderBO;
import com.zdp.common.result.ResultInfo;
import com.zdp.common.result.ResultInfoUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author sesshomaru
 * @date 2021/7/10 22:20
 */
@RestController
@RequestMapping("order")
public class OrderController {

    @Autowired
    private OrderService orderService;

    @PostMapping("create")
    public ResultInfo create(@RequestBody SubmitOrderBO submitOrderBO) {
        return ResultInfoUtil.buildSuccess(orderService.createOrder(submitOrderBO));
    }
}
